home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 4 / MacMania 4.toast / / Games&Education / logic-sim-25b1 / Info LogicSim 2.5 (CW mix) next >
Text File  |  1995-07-03  |  12KB  |  321 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22. WARNING
  23.  
  24. This document is still in draft form and was compiled by Charles Williams from a mixture experiments on an Alpha-test version of LogicSim and notes supplied by Arnaud Masson.  They are not therefore an entirely accurate desciption of the distributed version of LogicSim 2.5.  If you have any corrections or suggestions which will improve the docmentation please send them to  <C.D.H.Williams@exeter.ac.uk>. 
  25.  
  26. 0. CONTENTS
  27.  
  28. 1   What is LogicSim?
  29. 2   Contacting the author
  30. 3   Quick Start
  31. 4   The Circuit Window
  32. 5   Standard Components
  33. 6   Logic States and Buffers
  34. 7   Flip-Flops
  35. 8   The Signals Window
  36. 9   Simulation Speed
  37. 10 Gate Delays
  38. 11 LogicSim Menus
  39.  
  40.  
  41. 1. What is LogicSim?
  42.  
  43. LogicSim is an application which simulates digital circuits.
  44.  
  45. LogicSim has an easy-to-use graphical interface similar to standard drawing programs such as MacDraw™.  Circuits are built up from standard elements (gates, flip-flops, LEDs, switches, etc) and can include more complicated modules created by compiling a previous circuit.  LogicSim also has a "Signals window" providing an oscilloscope display of the signals at nodes in the circuit.   LogicSim 2.5 is a discrete-time-event-simulator which makes it more accurate than LogicSim 2.2 and most shareware simulators which use a fixed delay for all gates.
  46.  
  47. LogicSim 2.5 runs on a Macintosh LC or better and requires System 7 or greater (with System 7 you must have the Macintosh Drag-And-Drop in your Extensions Folder).  <STUFF ABOUT MAX NUMBER OF GATES, MEMORY ETC?>
  48.  
  49. LogicSim is Freeware (or rather PostcardWare!).  However, I had to develop LogicSim on a Macintosh LC, so if you are using it on a Quadra or a PowerPC, I think it would be a nice gesture if you were to send me some $ for my work, so that I can buy a faster computer too!
  50.  
  51.  
  52.  
  53. 2. Contacting the author
  54.  
  55. If you like this software please send a postcard to: Arnaud Masson, 22 route d'Epinal, 88600 Grandvillers, FRANCE.  Bug reports and suggestions to: amasson@planete.net for the time being.
  56.  
  57.  
  58. 3. Quick Start
  59.  
  60. <How to get simulating in three sentences here>
  61.  
  62. 4. The Circuit Window
  63.  
  64. <Description of the circuit window and basic drawing moves>
  65.  
  66. 5. Standard Components
  67.  
  68. There is a palette of standard components on the left side of each circuit window; these can be used in the simulation by dragging and dropping with the mouse in the usual way.
  69.  
  70.  
  71.   
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85. The ground and Vcc supplies at the top of the palette are  constant logic(0) and logic(1) sources respectively.  When the simulation is running, a single mouse click on the switch inverts its output from logic(0) to logic(1) and the next click switches it back to logic(0).  The button output normally stays at logic(0) but will change to logic(1) as long as the mouse is held down over it.  There is a choice of two output devices:  the single LED which lights up red when its input is at logic(1), and the Display4 which decodes the levels on its inputs and displays the result as a hexadecimal (0-9,A-E) digit on a seven-segment display.  Clocks generate square waves, alternating between logic(0) and logic(1), a clock's rate can be adjusted by typing -T when it is selected to invoke the component options dialogue.  Clicking a clock with the mouse will start or stop it running.
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115. The table lists the two-input gates and their state-tables, X represents an indeterminate state (see Logic States below).
  116.  
  117.  
  118. 6. Logic States and Buffers
  119.  
  120. Each pin in the simulated circuit must be in one of four states.  Two of these, logic(1) and logic(0), are just the usual binary values;  an output at either of these levels determines level of all the connected inputs.  A single input must not therefore be simultaneously connected to two outputs, they might have different values in which case the outcome will be indeterminate, and LogicSim will not allow connections that directly cause this.  The indeterminate, or "Don't Know", state can arise in other ways and is given the value logic(X).  There are circumstances, for example when different parts of a system communicate via a bus, when one really does want to have several physically separated outputs driving the same line.  This can be accomplished by using the buffers.
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. LogicSim has four kinds of buffer.  The plain Buffer simply sets its output equal to its input after the appropriate delay, the output of the NOT buffer is similarly the negated value of its input.  The Transistor buffer, also known as a 3-state buffer, connects its input direct to its output if the base connection is at logic(1) or, when the base is at logic(0), disconnects the output completely and leaves it in the high-impedance state logic(Z).  Logic(Z) is regarded as indeterminate by all devices except for the Wired device.  The Wired device, which is not exactly equivalent to traditional wired-AND/OR configuration, is the only method by which two outputs can be connected together.  It's state table is
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148. where A and B are the inputs.  Connecting a logic(1) output to one at logic(0) in a real piece of hardware would probably be a very bad idea, and a future version of LogicSim may implement a logic(!) state to represent the smell of burning epoxy, LogicSim 2.5 just treats the outcome as indeterminate.
  149.  
  150. When LogicSim 2.5 starts a simulation it normally assumes that all states are initially indeterminate and sets them to logic(X).  This performs the useful check that during operation the state of the circuit is a function solely of its inputs and time, not of the initial state.  The default initial state can be set to other values using the Options... dialogue from the Simulate menu, but you probably don't want to do this unless you have a very good reason.
  151.  
  152.  
  153. 7. Flip-Flops
  154.  
  155. LogicSim 2.5 provides several types of flip-flop:
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172. RSH is a simple set-reset flip-flop which is clocked by a positive going edge at the H input.  The most flexible of the supplied flip-flops is JK2 a positive edge triggered JK type with asynchronous preset and clear inputs.  JK is a simpler version, it is equivalent to JK2 with the preset and clear terminals tied to Vcc internally.  The D, or "data", flip-flop DFF has only one input D, which is transferred to the output on receipt of a positive edge at the clock input.  DLATCH is very similar device but, instead of being edge triggered, transfers its D input to the output while the clock input is at logic(1).  The T or "toggle" flip-flop TFF also only has one input;  when T=logic(1) the next positive edge at the clock toggles the output.  Before using these components do check that they follow the conventions you expect.  For example, DFF is a positive-edge triggered D-Type flip-flop and the example file "Faulty Pulse Synchroniser" illustrates its use in a circuit that requires a negative-edge triggering.
  173.  
  174.  
  175. 8. Gate Delays
  176.  
  177. LogicSim 2.5 associates 6 real values with each pin:
  178.  
  179.   • minimum, mean and maximum rise time
  180.   • minimum, mean and maximum fall time
  181.  
  182. A simulation session runs in one of four possible modes:
  183.  
  184.   • minimum delays
  185.   • mean delays
  186.   • maximum delays
  187.   • random delays
  188.  
  189. In random mode, delays are choosen at random between the minimum and maximum values.  If there is an unknown value (X state), the maximum delay is used.
  190.  
  191. Input and output pins react to delays in slightly different ways.  In the case of an output pin, after an internal change the algorithm 'waits' the specified time before updating the node that is attached to that pin.  For an input pin, after a node changes, the algorithm waits the specified time before updating internal value (and then proceeding with the gate simulation).  However, if the input node changes its value again before the internal value is updated, then the previous change is discarded. In fact, this mechanism acts like a low-pass filter.
  192.  
  193.  
  194.  
  195. 9. Simulation Speed
  196.  
  197. A LogicSim simulation cannot run as fast as a real circuit so the user can set the "Simulator clock rate" which is measured in hertz (Hz).  This is the number of simulation time units that happen in one (real world) second.  In fact the number specified by the user is a target -- the computer may be too slow to achieve it, in which case, the simulation will run as fast as it can (which will be affected by other applications running in the background).
  198.  
  199.  
  200.  
  201. 10. The Signals Window
  202.  
  203. This window is an oscilloscope display of the signal levels present at vaious points in the circuit.  Clicking with the mouse pointer inside this window creates a vertical cursor which can be dragged and used to identify the precise time and sequence of events.  The '+' and '-' buttons change the resolution on the time axis. If the simulation is stable the recording halts, because there is nothing happening, but the time axis can still be advanced manually with the '>>' button.  This increases time by the number of steps indicated in the adjacent editable text zone.  This is particularly useful if you are trying to create a picture showing what happens when the inputs to a stable circuit are changed. 
  204.  
  205.  
  206.  
  207. 11. LogicSim Menus
  208. [modified by A.M. for 2.5b]
  209.  
  210. Apple menu
  211.  
  212. About LogicSim... 
  213. Displays information about the price & the author
  214.  
  215. File menu
  216.  
  217. New
  218. Create a new document.
  219.  
  220. Open…
  221. Open a document (from any 2.x version, not 1.x).
  222.  
  223. Close
  224. Close a document.
  225.  
  226. Save
  227. Save a document.
  228.  
  229. Save as…
  230. Ask for a file name and save a document.
  231.  
  232. Page setup…
  233. Display a dialog to set printing parameters.
  234.  
  235. Save as PICT…
  236. Save a circuit drawing in a PICT file.  PICT files can be edited by standard drawing programs and can be imported into most word processors.
  237.  
  238. Print…
  239. Print a document (its circuit drawing).
  240.  
  241. Quit
  242. Quit LogicSim.
  243.  
  244.  
  245. Edit menu
  246.  
  247. Undo
  248. Never available, sorry!
  249.  
  250. Copy, Cut, Paste, Clear
  251. Standard Macintosh commands.
  252.  
  253. Show Notes
  254. Show a window where you can type any text you want saved with the whole document, for example, a description of what your circuit does.
  255.  
  256.  
  257. Circuit menu
  258.  
  259. Redraw
  260. Redraw the entire drawing window. May be useful after erasing some items.
  261.  
  262. Component delays
  263. Show a dialog where the pin delays for the selected component can be entered.  Why you might wish to do this is explained in the section on the LogicSim 2.5 algorithm above.
  264.  
  265. Component options…
  266. Show a dialog where some parameters of the selected component can be changed.  This dialog depends on the component or module. Most components have no parameters, so this command is not available. Clock components are a notable exception and this is the way to set their period.
  267.  
  268. Component name…
  269. Show a dialog where you can type a name to identify the selected component on the circuit.  If the first character is '/' or '~' then the component name is written with a bar over it, the conventional means of indicating negation.
  270.  
  271. Create module…
  272. Create a new module. The LEDs of the current circuit are the outputs and the switches are the inputs.  The preview window shows what the component will look like. You can click the 'copy' button and then paste the picture into your favorite drawing program (ClarisWorks, MacPaint,...) to modify it. Then return to LogicSim and click the 'paste' button.
  273.  
  274. Load module…
  275. Load a module created with the 'create module' command. The new module is added at the end of the module list on the let of the main window.
  276.  
  277.  
  278. Simulation menu
  279.  
  280. Options…
  281. Show a dialog where you can set:
  282. - Delays: which delay mode to use for the simulation
  283. - Initial node values: (this should be X under all normal circumstances)
  284. - Simulator clock rate: the speed of the simulation in the real world
  285. These options are explained further in the Gate Delays section above.
  286.  
  287. Run
  288. Start the circuit simulation.
  289.  
  290. Stop
  291. Stop the circuit simulation.
  292.  
  293. Reset
  294. If the simulation is running, restart it with the initial node values.
  295.  
  296. Pause
  297. Stop temporarily or proceed.
  298.  
  299. Show input values
  300. Display the values of input pins on the simulation drawing.
  301.  
  302. Show output values
  303. Display the values of output pins on the simulation drawing.
  304.  
  305. Show internal values
  306. When unchecked the real node values are displayed, when checked the internal values of components are displayed.  The internal and external values will generally differ as a result of delays.  However, if the simulation is stable (i.e. nothing is changing), the two display modes will give the same results.
  307.  
  308. Record
  309. Stop/restart the recording of the LEDs/switches/buttons/clocks values in the Signals Window.
  310.  
  311.  
  312. Windows menu
  313.  
  314. Each available window is listed and can be brought to the front by selecting it.
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.